package com.youi.entity;

import java.util.Date;

import com.youi.common.DelStatus;

import java.sql.*;


import java.io.Serializable;


/**
 * 购物车与商品中间表
 * @author XJY
 */
public class Goodsandgoodscar implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private Long goodscarId;				    //购物车id
	private Long goodsId;					    //商品id
	private Long goodssizeId;					//商品规格id
	private String specification;			    //规格
	private Integer count;					    //数量
	private Double amount;						//金额
	
	private Goods goods;						//商品信息
	private String goodsImg;					//商品图片
	private Double goodsPeice;					//商品单价
	private Integer maxStockNum;				//商品可购买的最大数量
	private Integer goodsStatus;				//商品状态
	
    public Goodsandgoodscar(){

    }

    public Goodsandgoodscar(Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }


    public Goodsandgoodscar(Long id,Date gmtCreated,Integer delStatus,Date gmtModify,Long goodscarId,Long goodsId,String specification,Integer count) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
       this.goodscarId=goodscarId;
       this.goodsId=goodsId;
       this.specification=specification;
       this.count=count;
    }
    
    public Goodsandgoodscar(Long goodscarId,Long goodsId,Long goodssizeId,String specification,Integer count,Double amount) {
        this.gmtCreated=new Date();
        this.delStatus=DelStatus.NODEL;
        this.gmtModify=gmtCreated;
        this.goodscarId=goodscarId;
        this.goodsId=goodsId;
        this.goodssizeId=goodssizeId;
        this.specification=specification;
        this.count=count;
        this.amount=amount;
     }


	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setGoodscarId(Long goodscarId){
		this.goodscarId=goodscarId;
	}

	public Long getGoodscarId(){
		return goodscarId;
	}

	public void setGoodsId(Long goodsId){
		this.goodsId=goodsId;
	}

	public Long getGoodsId(){
		return goodsId;
	}

	public void setSpecification(String specification){
		this.specification=specification;
	}

	public String getSpecification(){
		return specification;
	}

	public void setCount(Integer count){
		this.count=count;
	}

	public Integer getCount(){
		return count;
	}

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	public String getGoodsImg() {
		return goodsImg;
	}

	public void setGoodsImg(String goodsImg) {
		this.goodsImg = goodsImg;
	}

	public Long getGoodssizeId() {
		return goodssizeId;
	}

	public void setGoodssizeId(Long goodssizeId) {
		this.goodssizeId = goodssizeId;
	}

	public Double getGoodsPeice() {
		return goodsPeice;
	}

	public void setGoodsPeice(Double goodsPeice) {
		if (goodsPeice!=null) {
			this.goodsPeice = goodsPeice;
		}else {
			this.goodsPeice=0.00;
		}
	}

	public Integer getMaxStockNum() {
		return maxStockNum;
	}

	public void setMaxStockNum(Integer maxStockNum) {
		this.maxStockNum = maxStockNum;
	}

	public Integer getGoodsStatus() {
		return goodsStatus;
	}

	public void setGoodsStatus(Integer goodsStatus) {
		this.goodsStatus = goodsStatus;
	}

}
